A SwitchYard project is a Maven based project that contains a switchyard.xml file in the project's META-INF folder, declares one or more SwitchYard runtime dependencies and configures the org.switchyard:switchyard-plugin build plugin. A SwitchYard project may also contain a variety of resources used to implement the application including, but not limited to: Java, BPMN2, DRL, BPEL, WSDL, XSD, and XML files.
The Eclipse tooling supports the creation of new SwitchYard projects, as well as adding SwitchYard capabilities to existing Maven based projects in the workspace.
The tooling provides a new project wizard which creates a new Maven project in your workspace. The new project contains the following:
pom.xml file containing dependencies and build plugin configuration for the selected SwitchYard components.
src/main/resources/META-INF/switchyard.xml file, initialized using information from the wizard.
beans.xml file in src/main/resources/META-INF/ and src/test/resources/META-INF/ (required to support CDI)
folder hierarchy in src/main/java and src/test/java for the default Java package
Upon completion of the wizard, the project will be created and the project's switchyard.xml file will be opened in the SwitchYard editor.
To create a new SwitchYard project, select SwitchYard Project from the SwitchYard category the File→New→Project... wizard.
The first page is a basic new project screen, allowing the user to specify the name and location of the new project:
The second page allows the user to specify some basic project details, including:
The Maven groupId for the project.
The target namespace for the SwitchYard application.
The default Java package name for the project.
The SwitchYard runtime version.
The SwitchYard runtime components (e.g. BPM, Camel, SOAP, etc. support) required for the project.
Press Finish to create the new project.
SwitchYard capabilities may be added to any existing Maven project in the workspace. To add/modify SwitchYard capabilities, simply right-click the project and select, Configure -> SwitchYard Capabilities... A prompt will be displayed asking for confirmation.
If the project is not already a Faceted Project the prompt will ask if you wish to convert the project to use project facets.
If the project does not contain a switchyard.xml file in the project's META-INF folder, one will be creating with the following defaults:
name - project's Maven artifactId
target namespace - URN URI based on project's Maven groupId and version
These can be modified in the SwitchYard editor.
A property dialog will be displayed, allowing configuration of the SwitchYard runtime required by the project.
Any changes made will be reflected in the project's pom.xml file (e.g. dependencies, build plugin configuration, SwitchYard version).